﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TCG
{
    [Serializable]
    public class ResourceCount : Dictionary<Resource, int>
    {
        public ResourceCount(params ResourcePair[] array)
        {
            foreach (ResourcePair e in array)
            {
                this.Add(e.X, e.Y);
            }
        }

        public override string ToString()
        {
            string result = "";
            foreach (Resource key in this.Keys)
                result += key.ToString() + ": " + this[key].ToString() + " ";
            return result;
        }
    }

    [Serializable]
    public class SourceCount : Dictionary<Source, int>
    {
        public SourceCount(params SourcePair[] array)
        {
            foreach (SourcePair e in array)
            {
                this.Add(e.X, e.Y);
            }
        }

        public override string ToString()
        {
            string result = "";
            foreach (Source key in this.Keys)
                result += key.ToString() + ": " + this[key].ToString() + " ";
            return result;
        }
    }

    [Serializable]
    public class Resource
    {
        public String Name { get; set; }

        public override string ToString()
        {
            return Name;
        }
    }

    [Serializable]
    public class Source
    {
        public String Name { get; set; }

        public Resource Res { get; set; }

        public override string ToString()
        {
            return Name;
        }
    }

    public enum SourceIndex : int
    {
        MANA = 0
    }
}
